{% extends "base.html" %}  
{% block title %} 患者列表 {% endblock %}  

{% block content %} 

  <div class="container">

    <!-- Docs nav
    ================================================== -->
    <div class="row">
      <div class="span3 bs-docs-sidebar">
        <ul class="nav nav-list bs-docs-sidenav">
        <li><a href="{% url sle.views.list_patient %}"><i class="icon-chevron-right"></i> 返回列表</a></li>
        <li><a href="{% url sle.views.list_follow id %}"><i class="icon-chevron-right"></i>随访记录</a></li>
          <li><a href="#hzzl"><i class="icon-chevron-right"></i>患者资料</a></li>
          <li><a href="#hzyy"><i class="icon-chevron-right"></i>患者诱因</a></li>
          <li><a href="#hzbz"><i class="icon-chevron-right"></i>患者病症</a></li>
          <li><a href="#bqyb"><i class="icon-chevron-right"></i>病情演变</a></li>
          <li><a href="#hzls"><i class="icon-chevron-right"></i>患者历史</a></li>
          <li><a href="#tjbg"><i class="icon-chevron-right"></i>体检报告</a></li>
          <li><a href="#flbz"><i class="icon-chevron-right"></i>分类标准</a></li>
          
          
        </ul>
      </div>
      
      

<div class="span9">
              
          <section id="hzzl">
          <div class="page-header">
            <h2>患者资料</h2>
          </div>

        
<div class="bs-docs-example">
{% if patient_instance and patientno_instance and hospitalized_instance %}
 <form id="hzzl_form" action="{% url sle.views.update_patient %}" method="POST" class="form-inline" >
 {% csrf_token %}
  <label class="control-label" for="inputName">患者姓名</label>{{patient_instance.patient_name.errors}}
  <input name="patient_name" id="inputName" type="text" class="input-small" placeholder="患者姓名" value="{{patient_instance.patient_name}}"/>
  <label class="control-label" for="inputAge">患者年龄</label>
  <input name="patient_age" id="inputAge" type="text" class="input-small" placeholder="患者年龄" value="{{patient_instance.patient_age}}"/>
  <label class="control-label" for="birthdate">出生日期</label>
  <input name="patient_birthdate" id="birthdate" type="text" class="input-small" onFocus="HS_setDate(this)" placeholder="形如:2000-01-01" value="{{patient_instance.patient_birthdate|date:"Y-m-d"}}"/><br/><br/>
  <label class="control-label" for="company">工作单位</label>
  <input name="patient_company" type="text" class="input-small" id="company" placeholder="工作单位" value="{{patient_instance.patient_company}}"/>
    <label class="control-label" for="home">家庭住址</label>
  <input name="patient_home" type="text" class="input-small" id="home" placeholder="家庭住址" value="{{patient_instance.patient_home}}"/>
      <label class="control-label" for="tel">联系号码</label>
  <input name="patient_tel" type="text" class="input-small" id="tel" placeholder="联系号码" value="{{patient_instance.patient_tel}}"/><br/><br/>
        <label class="control-label" for="patient_card">身份证号</label>
  <input name="patient_card" type="text" class="input-small" id="patient_card" placeholder="身份证号" value="{{patient_instance.patient_card}}"/>
        <label class="control-label" for="patient_native">患者籍贯</label>
  <input name="patient_native" type="text" class="input-small" id="patient_native" placeholder="患者籍贯" value="{{patient_instance.patient_native}}"/>
        <label class="control-label" for="patient_inputdate">填表日期</label>
  <input name="patient_inputdate" type="text" class="input-small" id="patient_inputdate" placeholder="形如:2000-01-01"  onFocus="HS_setDate(this)" value="{{patient_instance.patient_inputdate|date:"Y-m-d"}}"/><br/><br/>
  <label class="control-label" for="recordNo">登记号码</label>
  <input name="patient_number" type="text" class="input-small" id="recordNo" placeholder="登记号" readonly="readonly" value="{{patient_instance.patient_number}}"/>
      <label class="control-label" for="patient_gender" style="margin-right:14px;">患者性别</label>
   <label class="radio" style="margin-right:35px;">
              <input type="radio" name="patient_gender" id="optionsRadios1" value="男" {% if patient_instance.patient_gender == '男' %} checked="checked" {% endif %}/>
              男
            </label>
            <label class="radio">
              <input type="radio" name="patient_gender" id="optionsRadios2" value="女" {% if patient_instance.patient_gender == '女' %} checked="checked" {% endif %}/>
              女
            </label>
    <label class="control-label" for="patient_remark"  style="margin-left:67px;">简单备注</label>
  <input name="patient_remark" type="text" class="input-small" id="patient_remark" placeholder="简单备注" value="{{patient_instance.patient_remark}}"/><br/><br/>
  
  {% for mzh in patientno_instance %}
  {% if forloop.first %}
        <label class="control-label" for="PatientNo">门诊号码</label>
  <input name="Patient_no" type="text" class="input-small" id="PatientNo" placeholder="门诊号" value="{{mzh.Patient_no}}"/>
  <button class="btn btn-mini btn-primary" type="button" id="add_PatientNo">增加门诊号</button><br/>
  
  {% else %}
  <div id="remove_pn{{forloop.counter}}"><br><label class="control-label" for="PatientNo">门诊号码 </label><input type="text" class="input-small" id="PatientNo{{forloop.counter}}" placeholder="门诊号" value="{{mzh.Patient_no}}"/>  <button class="btn btn-mini btn-primary" onclick="deltr({{forloop.counter}})" type="button">删除门诊号</button><br></div>
  
  {% endif %}
  
  {% endfor %}
  
  {% for zyh in hospitalized_instance %}
    {% if forloop.first %}
    <br>
    <label class="control-label" for="hospitalized">住院号码</label>
  <input name="hospitalized_no" type="text" class="input-small" id="hospitalized" placeholder="住院号"  value="{{zyh.hospitalized_no}}"/>
  <button class="btn btn-mini btn-primary" type="button" id="add_hospitNo">增加住院号</button><br/><br/>
  {% else %}
  
  <div id="remove_ph{{forloop.counter}}"><br><label class="control-label" for="hospitalized">住院号码 </label><input type="text" class="input-small" id="hospitalized{{forloop.counter}}" placeholder="住院号码"  value="{{zyh.hospitalized_no}}">  <button class="btn btn-mini btn-primary" onclick="deltr2({{forloop.counter}})" type="button">删除住院号</button><br></div>
  
  {% endif %}
  {% endfor %}
<input type="hidden" id="new_patno" name="nno" value=""/>
<input type="hidden" id="new_hosno" name="nho" value=""/>
<input type="hidden" id="patient_id" name="patient_id" value="{{patient_instance.id}}"/>
  <button id="hzzl_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
</form>

   {% endif %}
</div>


        
        </section>
        
        
        
                  <section id="hzyy">
          <div class="page-header">
            <h2>患者诱因</h2>
          </div>

        
<div class="bs-docs-example">
{% if Incentive_instance %}
  {% for ii in Incentive_instance %}
   <form id="hzyy_form" action="{% url sle.views.update_Infection %}" method="POST" class="form-inline" >{% csrf_token %}
  <label class="control-label" for="Infection">感染</label>
  <input name="Infection" id="Infection" type="text" class="input-small" placeholder="感染" value="{{ii.Infection}}"/>
  <label class="control-label" for="Pregnancy">妊娠 </label>
  <input name="Pregnancy" id="Pregnancy" type="text" class="input-small" placeholder="妊娠" value="{{ii.Pregnancy}}"/>
  <label class="control-label" for="Drugs">药物 </label>
  <input name="Drugs" id="Drugs" type="text" class="input-small" placeholder="药物"  value="{{ii.Drugs}}"/><br/><br/>
  <label class="control-label" for="Tired">劳累 </label>
  <input name="Tired" type="text" class="input-small" id="Tired" placeholder="劳累"  value="{{ii.Tired}}"/>
    <label class="control-label" for="Menopause">绝经</label>
  <input name="Menopause" type="text" class="input-small" id="Menopause" placeholder="绝经"  value="{{ii.Menopause}}"/>
      <label class="control-label" for="Others">其他</label>
  <input name="Others" type="text" class="input-small" id="Others" placeholder="其他"  value="{{ii.Others}}"/><br/><br/>
        <label class="control-label" for="Fitment">居室装修</label>
  <input name="Fitment" type="text" class="input-small" id="Fitment" placeholder="居室装修"  value="{{ii.Fitment}}"/>
        <label class="control-label" for="Psychogenic">精神因素</label>
  <input name="Psychogenic" type="text" class="input-small" id="Psychogenic" placeholder="精神因素"  value="{{ii.Psychogenic}}"/><br/><br/>
  <input type="hidden" value="{{ii.id}}" name="incentive_id"/>

  <button id="hzyy_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
</form>
  {% endfor %}
  {% else %}
  <form id="hzyy_form" action="{% url sle.views.save_Infection %}" method="POST" class="form-inline" >{% csrf_token %}
  <label class="control-label" for="Infection">感染</label>
  <input name="Infection" id="Infection" type="text" class="input-small" placeholder="感染" value="{{ii.Infection}}"/>
  <label class="control-label" for="Pregnancy">妊娠 </label>
  <input name="Pregnancy" id="Pregnancy" type="text" class="input-small" placeholder="妊娠" value="{{ii.Pregnancy}}"/>
  <label class="control-label" for="Drugs">药物 </label>
  <input name="Drugs" id="Drugs" type="text" class="input-small" placeholder="药物"  value="{{ii.Drugs}}"/><br/><br/>
  <label class="control-label" for="Tired">劳累 </label>
  <input name="Tired" type="text" class="input-small" id="Tired" placeholder="劳累"  value="{{ii.Tired}}"/>
    <label class="control-label" for="Menopause">绝经</label>
  <input name="Menopause" type="text" class="input-small" id="Menopause" placeholder="绝经"  value="{{ii.Menopause}}"/>
      <label class="control-label" for="Others">其他</label>
  <input name="Others" type="text" class="input-small" id="Others" placeholder="其他"  value="{{ii.Others}}"/><br/><br/>
        <label class="control-label" for="Fitment">居室装修</label>
  <input name="Fitment" type="text" class="input-small" id="Fitment" placeholder="居室装修"  value="{{ii.Fitment}}"/>
        <label class="control-label" for="Psychogenic">精神因素</label>
  <input name="Psychogenic" type="text" class="input-small" id="Psychogenic" placeholder="精神因素"  value="{{ii.Psychogenic}}"/><br/><br/>

  <button id="hzyy_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
</form>
  {% endif %}
</div>


        
        </section>
        
        
        
        
                  <section id="hzbz">
          <div class="page-header">
            <h2>患者病症</h2>
          </div>

        
<div class="bs-docs-example">
{% if Manifestation_instance %}
{% for mi in Manifestation_instance %}
 <form id="hzbz_form" action="{% url sle.views.update_Manifestation %}" method="POST" class="form-inline" >{% csrf_token %}
    <label class="control-label" for="Menstruation">月经</label>
  <input name="Menstruation" type="text" class="input-small" id="Menstruation" placeholder="月经" style="width:630px;" value="{{mi.Menstruation}}"/><br/><br/>
  <label class="control-label" for="Skin">皮肤 </label>
  <input name="Skin" id="Skin" type="text" class="input-small" placeholder="皮肤" style="width:630px;" value="{{mi.Skin}}"/><br/><br/>
  <label class="control-label" for="Joint">关节 </label>
  <input name="Joint" id="Joint" type="text" class="input-small" placeholder="关节" style="width:630px;" value="{{mi.Joint}}"/><br/><br/>
  <label class="control-label" for="Muscle">肌肉 </label>
  <input name="Muscle" type="text" class="input-small" id="Muscle" placeholder="肌肉"  style="width:630px;" value="{{mi.Muscle}}"/><br/><br/>
    <label class="control-label" for="Respiratory">呼吸</label>
  <input name="Respiratory" type="text" class="input-small" id="Respiratory" placeholder="呼吸" style="width:630px;" value="{{mi.Respiratory}}"/><br/><br/>
      <label class="control-label" for="Cardiovascular">心血管</label>
  <input name="Cardiovascular" type="text" class="input-small" id="Cardiovascular" placeholder="心血管"  style="width:615px;" value="{{mi.Cardiovascular}}"/><br/><br/>
        <label class="control-label" for="Digestive">消化系统</label>
  <input name="Digestive" type="text" class="input-small" id="Digestive" placeholder="消化系统"  style="width:600px;" value="{{mi.Digestive}}"/><br/><br/>
  <label class="control-label" for="Hemotologic">血液系统</label>
  <input name="Hemotologic" type="text" class="input-small" id="Hemotologic" placeholder="血液系统" style="width:600px;" value="{{mi.Hemotologic}}"/><br/><br/>
  <label class="control-label" for="Urinary">泌尿系统</label>
  <input name="Urinary" type="text" class="input-small" id="Urinary" placeholder="泌尿系统"  style="width:600px;" value="{{mi.Urinary}}"/><br/><br/>
  <label class="control-label" for="Nervous">神经系统</label>
  <input name="Nervous" type="text" class="input-small" id="Nervous" placeholder="神经系统"  style="width:600px;" value="{{mi.Nervous}}"/><br/><br/>
  <label class="control-label" for="Initial">首发症状 </label>
  <input name="Initial" id="Initial" type="text" class="input-small" placeholder="首发症状" style="width:600px;" value="{{mi.Initial}}"/><br/><br/>
          <label class="control-label" for="Raynaud">雷诺氏现象</label>
  <input name="Raynaud" type="text" class="input-small" id="Raynaud" placeholder="雷诺氏现象" style="width:590px;" value="{{mi.Raynaud}}"/><br/><br/>
  <input type="hidden" value="{{mi.id}}" name="manifestation_id"/>
  <button id="hzbz_submit" type="submit" class="btn btn-info" style="float:right;" >更新</button>
</form>
{% endfor %}
{% else %}
<form id="hzbz_form" action="{% url sle.views.save_Manifestation %}" method="POST" class="form-inline" >{% csrf_token %}
    <label class="control-label" for="Menstruation">月经</label>
  <input name="Menstruation" type="text" class="input-small" id="Menstruation" placeholder="月经" style="width:630px;"/><br/><br/>
  <label class="control-label" for="Skin">皮肤 </label>
  <input name="Skin" id="Skin" type="text" class="input-small" placeholder="皮肤" style="width:630px;"/><br/><br/>
  <label class="control-label" for="Joint">关节 </label>
  <input name="Joint" id="Joint" type="text" class="input-small" placeholder="关节" style="width:630px;"/><br/><br/>
  <label class="control-label" for="Muscle">肌肉 </label>
  <input name="Muscle" type="text" class="input-small" id="Muscle" placeholder="肌肉"  style="width:630px;"/><br/><br/>
    <label class="control-label" for="Respiratory">呼吸</label>
  <input name="Respiratory" type="text" class="input-small" id="Respiratory" placeholder="呼吸" style="width:630px;" /><br/><br/>
      <label class="control-label" for="Cardiovascular">心血管</label>
  <input name="Cardiovascular" type="text" class="input-small" id="Cardiovascular" placeholder="心血管"  style="width:615px;"/><br/><br/>
        <label class="control-label" for="Digestive">消化系统</label>
  <input name="Digestive" type="text" class="input-small" id="Digestive" placeholder="消化系统"  style="width:600px;"/><br/><br/>
  <label class="control-label" for="Hemotologic">血液系统</label>
  <input name="Hemotologic" type="text" class="input-small" id="Hemotologic" placeholder="血液系统" style="width:600px;" /><br/><br/>
  <label class="control-label" for="Urinary">泌尿系统</label>
  <input name="Urinary" type="text" class="input-small" id="Urinary" placeholder="泌尿系统"  style="width:600px;"/><br/><br/>
  <label class="control-label" for="Nervous">神经系统</label>
  <input name="Nervous" type="text" class="input-small" id="Nervous" placeholder="神经系统"  style="width:600px;"/><br/><br/>
  <label class="control-label" for="Initial">首发症状 </label>
  <input name="Initial" id="Initial" type="text" class="input-small" placeholder="首发症状" style="width:600px;"/><br/><br/>
          <label class="control-label" for="Raynaud">雷诺氏现象</label>
  <input name="Raynaud" type="text" class="input-small" id="Raynaud" placeholder="雷诺氏现象" style="width:590px;" /><br/><br/>
  
  <button id="hzbz_submit" type="submit" class="btn btn-info" style="float:right;" >更新</button>
</form>


{% endif %}
</div>


        
        </section>
        
        
        
        
                  <section id="bqyb">
          <div class="page-header">
            <h2>病情演变</h2>
          </div>

        
<div class="bs-docs-example">
{% if Course_instance %}
{% for ci in Course_instance %}
  <form id="bqyb_form" action="{% url sle.views.update_Course %}" method="POST" class="form-inline" >{% csrf_token %}
    <label class="control-label" for="Course">病情演变</label>
  <textarea name="Course" type="text" class="input-small" id="Course" placeholder="病情演变" style="width:600px;">{{ci.Course}}</textarea><br/><br/>
  <input type="hidden" name="course_id" value="{{ci.id}}"/>
 
  <button id="bqyb_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
</form>
{% endfor %}
{% else %}
<form id="bqyb_form" action="{% url sle.views.save_Course %}" method="POST" class="form-inline" >{% csrf_token %}
    <label class="control-label" for="Course">病情演变</label>
  <textarea name="Course" type="text" class="input-small" id="Course" placeholder="病情演变" style="width:600px;"></textarea><br/><br/>
 
  <button id="bqyb_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
</form>
{% endif %}
</div>


        
        </section>
        
        
        
                          <section id="hzls">
          <div class="page-header">
            <h2>患者历史</h2>
          </div>

        
<div class="bs-docs-example">
{% if History_instance %}
{% for hi in History_instance%}
   <form id="hzls_form" action="{% url sle.views.update_History %}" method="POST" class="form-inline" >{% csrf_token %}
  <label class="control-label" for="Past">既往史</label>
  <input name="Past" id="Past" type="text" class="input-small" placeholder="既往史" style="width:615px;" value="{{hi.Past}}"/><br/><br/>
  <label class="control-label" for="Family">家族史  </label>
  <input name="Family" id="Family" type="text" class="input-small" placeholder="家族史" style="width:615px;" value="{{hi.Family}}"/><br/><br/>
  <label class="control-label" for="Birth">生育史  </label>
  <input name="Birth" id="Birth" type="text" class="input-small" placeholder="生育史" style="width:615px;" value="{{hi.Birth}}"/><br/><br/>
  <label class="control-label" for="Pregnancy">妊娠次数  </label>
  <input name="Pregnancy" type="text" class="input-small" id="Pregnancy" placeholder="妊娠次数 " style="width:260px;"  value="{{hi.Pregnancy}}"/>
    <label class="control-label" for="Birthtime">分娩</label>
  <input name="Birthtime" type="text" class="input-small" id="Birthtime" placeholder="分娩次数" style="width:280px;"  value="{{hi.Birthtime}}"/><br/><br/>
      <label class="control-label" for="Abortion">流产</label>
  <input name="Abortion" type="text" class="input-small" id="Abortion" placeholder="流产次数" style="width:290px;"  value="{{hi.Abortion}}"/>
        <label class="control-label" for="Living">存活 </label>
  <input name="Living" type="text" class="input-small" id="Living" placeholder="存活数" style="width:280px;"  value="{{hi.Living}}"/><br/><br/>
        <label class="control-label" for="F">F&nbsp;&nbsp;</label>
  <input name="Fs" type="text" class="input-small" id="F" placeholder="F数" style="width:300px;" value="{{hi.Fs}}"/>
        <label class="control-label" for="M">M&nbsp;&nbsp;</label>
  <input name="Ms" type="text" class="input-small" id="M" placeholder="M数" style="width:290px;"  value="{{hi.Ms}}"/><br/><br/>
<input name="history_id" type="hidden" value="{{hi.id}}" />
  <button id="hzls_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
</form>
{% endfor %}
{% else %}
<form id="hzls_form" action="{% url sle.views.save_History %}" method="POST" class="form-inline" >{% csrf_token %}
  <label class="control-label" for="Past">既往史</label>
  <input name="Past" id="Past" type="text" class="input-small" placeholder="既往史" style="width:615px;"/><br/><br/>
  <label class="control-label" for="Family">家族史  </label>
  <input name="Family" id="Family" type="text" class="input-small" placeholder="家族史" style="width:615px;"/><br/><br/>
  <label class="control-label" for="Birth">生育史  </label>
  <input name="Birth" id="Birth" type="text" class="input-small" placeholder="生育史" style="width:615px;"/><br/><br/>
  <label class="control-label" for="Pregnancy">妊娠次数  </label>
  <input name="Pregnancy" type="text" class="input-small" id="Pregnancy" placeholder="妊娠次数 " style="width:260px;"/>
    <label class="control-label" for="Birthtime">分娩</label>
  <input name="Birthtime" type="text" class="input-small" id="Birthtime" placeholder="分娩次数" style="width:280px;"/><br/><br/>
      <label class="control-label" for="Abortion">流产</label>
  <input name="Abortion" type="text" class="input-small" id="Abortion" placeholder="流产次数" style="width:290px;"/>
        <label class="control-label" for="Living">存活 </label>
  <input name="Living" type="text" class="input-small" id="Living" placeholder="存活数" style="width:280px;"/><br/><br/>
        <label class="control-label" for="F">F&nbsp;&nbsp;</label>
  <input name="Fs" type="text" class="input-small" id="F" placeholder="F数" style="width:300px;"/>
        <label class="control-label" for="M">M&nbsp;&nbsp;</label>
  <input name="Ms" type="text" class="input-small" id="M" placeholder="M数" style="width:290px;"/><br/><br/>

  <button id="hzls_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
{% endif %}
</div>


        
        </section>
        
        
        
           <section id="tjbg">
          <div class="page-header">
            <h2>体检报告</h2>
          </div>

        
<div class="bs-docs-example">
{% if Physical_instance %}
{% for phi in Physical_instance %}
   <form id="tjbg_form" action="{% url sle.views.update_Physical %}" method="POST" class="form-inline" >{% csrf_token %}
    <label class="control-label" for="Lung">肺</label>
  <input name="Lung" type="text" class="input-small" id="Lung" placeholder="肺"  style="width:640px;" value="{{phi.Lung}}"/><br/><br/>
        <label class="control-label" for="Heart">心</label>
  <input name="Heart" type="text" class="input-small" id="Heart" placeholder="心"  style="width:640px;" value="{{phi.Heart}}"/><br/><br/>
  <label class="control-label" for="Liver">肝</label>
  <input name="Liver" type="text" class="input-small" id="Liver" placeholder="肝" style="width:640px;" value="{{phi.Liver}}" /><br/><br/>
  <label class="control-label" for="Spleen">脾</label>
  <input name="Spleen" type="text" class="input-small" id="Spleen" placeholder="脾"  style="width:640px;" value="{{phi.Spleen}}"/><br/><br/>
    <label class="control-label" for="Hair">毛发</label>
  <input name="Hair" type="text" class="input-small" id="Hair" placeholder="毛发" style="width:630px;" value="{{phi.Skin2}}"/><br/><br/>
  <label class="control-label" for="Skin2">皮肤 </label>
  <input name="Skin2" id="Skin2" type="text" class="input-small" placeholder="皮肤" style="width:630px;" value="{{phi.Edema}}"/><br/><br/>
  <label class="control-label" for="Edema">浮肿</label>
  <input name="Edema" type="text" class="input-small" id="Edema" placeholder="浮肿" style="width:630px;" value="{{phi.Joint}}" /><br/><br/>
  <label class="control-label" for="Joint">关节</label>
  <input name="Joint" type="text" class="input-small" id="Joint" placeholder="关节"  style="width:630px;" value="{{phi.Joint}}"/><br/><br/>
    <label class="control-label" for="Muscle2">肌肉</label>
  <input name="Muscle2" type="text" class="input-small" id="Muscle2" placeholder="肌肉" style="width:630px;"  value="{{phi.Muscle2}}"/><br/><br/>
  <label class="control-label" for="Vasculitis">血管炎 </label>
  <input name="Vasculitis" id="Vasculitis" type="text" class="input-small" placeholder="血管炎" style="width:615px;" value="{{phi.Vasculitis}}"/><br/><br/>
  <label class="control-label" for="Lymph">淋巴结</label>
  <input name="Lymph" id="Lymph" type="text" class="input-small" placeholder="淋巴结" style="width:615px;" value="{{phi.Lymph}}"/><br/><br/>
  <label class="control-label" for="Nervous2">神经系统</label>
  <input name="Nervous2" type="text" class="input-small" id="Nervous2" placeholder="神经系统"  style="width:600px;" value="{{phi.Nervous2}}"/><br/><br/>
          <input name="physical_id" type="hidden" value="{{phi.id}}" />
  
  <button id="tjbg_submit" type="submit"   class="btn btn-info" style="float:right;">更新</button>
</form>

{% endfor %}
{% else %}

 <form id="tjbg_form" action="{% url sle.views.save_Physical %}" method="POST" class="form-inline" >{% csrf_token %}
    <label class="control-label" for="Lung">肺</label>
  <input name="Lung" type="text" class="input-small" id="Lung" placeholder="肺"  style="width:640px;"/><br/><br/>
        <label class="control-label" for="Heart">心</label>
  <input name="Heart" type="text" class="input-small" id="Heart" placeholder="心"  style="width:640px;"/><br/><br/>
  <label class="control-label" for="Liver">肝</label>
  <input name="Liver" type="text" class="input-small" id="Liver" placeholder="肝" style="width:640px;" /><br/><br/>
  <label class="control-label" for="Spleen">脾</label>
  <input name="Spleen" type="text" class="input-small" id="Spleen" placeholder="脾"  style="width:640px;"/><br/><br/>
    <label class="control-label" for="Hair">毛发</label>
  <input name="Hair" type="text" class="input-small" id="Hair" placeholder="毛发" style="width:630px;"/><br/><br/>
  <label class="control-label" for="Skin2">皮肤 </label>
  <input name="Skin2" id="Skin2" type="text" class="input-small" placeholder="皮肤" style="width:630px;"/><br/><br/>
  <label class="control-label" for="Edema">浮肿</label>
  <input name="Edema" type="text" class="input-small" id="Edema" placeholder="浮肿" style="width:630px;" /><br/><br/>
  <label class="control-label" for="Joint">关节</label>
  <input name="Joint" type="text" class="input-small" id="Joint" placeholder="关节"  style="width:630px;"/><br/><br/>
    <label class="control-label" for="Muscle2">肌肉</label>
  <input name="Muscle2" type="text" class="input-small" id="Muscle2" placeholder="肌肉" style="width:630px;" /><br/><br/>
  <label class="control-label" for="Vasculitis">血管炎 </label>
  <input name="Vasculitis" id="Vasculitis" type="text" class="input-small" placeholder="血管炎" style="width:615px;"/><br/><br/>
  <label class="control-label" for="Lymph">淋巴结</label>
  <input name="Lymph" id="Lymph" type="text" class="input-small" placeholder="淋巴结" style="width:615px;"/><br/><br/>
  <label class="control-label" for="Nervous2">神经系统</label>
  <input name="Nervous2" type="text" class="input-small" id="Nervous2" placeholder="神经系统"  style="width:600px;"/><br/><br/>
          
  
  <button id="tjbg_submit" type="submit"  class="btn btn-info" style="float:right;">更新</button>
</form>

{% endif %}
</div>


        
        </section>
        
        
        
        
        
        <section id="flbz">
          <div class="page-header">
            <h2>分类标准</h2>
          </div>

        
<div class="bs-docs-example">
 {% if Standard_instance %}
 {% for si in Standard_instance %}
 <form id="flbz_form" action="{% url sle.views.update_Standard %}" method="POST" class="form-inline" >{% csrf_token %}
 
<div class="row-fluid">
            <div class="span6">
              <h2>I、口腔症状：</h2>
              <p>1、每日感口干持续3个月以上；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios1" id="optionsRadios1" value="1" {% if si.optionsRadios1 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios1" id="optionsRadios2" value="0" {% if si.optionsRadios1 == '0' %}checked{% endif %} />
              否
            </label>
              
               <p>2、成年后腮腺反复或持续肿大；</p>
                <label class="radio">
              <input type="radio" name="optionsRadios2" id="optionsRadios1" value="1" {% if si.optionsRadios2 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios2" id="optionsRadios2" value="0" {% if si.optionsRadios2 == '0' %}checked{% endif %} />
              否
            </label>
              <p>3、吞咽干性食物时需用水帮助。</p>
               <label class="radio">
              <input type="radio" name="optionsRadios3" id="optionsRadios1" value="1" {% if si.optionsRadios3 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios3" id="optionsRadios2" value="0" {% if si.optionsRadios3 == '0' %}checked{% endif %} />
              否
            </label>
            </div><!--/span-->
            <div class="span6">
              <h2>II、眼部症状：</h2>
              <p>1、每日感到不能忍受的眼干持续3个月以上；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios4" id="optionsRadios1" value="1" {% if si.optionsRadios4 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios4" id="optionsRadios2" value="0" {% if si.optionsRadios4 == '0' %}checked{% endif %} />
              否
            </label>
              
               <p>2、有反复的砂子进眼或砂磨感觉；</p>
                <label class="radio">
              <input type="radio" name="optionsRadios5" id="optionsRadios1" value="1" {% if si.optionsRadios5 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios5" id="optionsRadios2" value="0" {% if si.optionsRadios5 == '0' %}checked{% endif %} />
              否
            </label>
              <p>3、每日需用人工泪液3次或3次以上。</p>
               <label class="radio">
              <input type="radio" name="optionsRadios6" id="optionsRadios1" value="1" {% if si.optionsRadios6 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios6" id="optionsRadios2" value="0" {% if si.optionsRadios6 == '0' %}checked{% endif %} />
              否
            </label>
            </div><!--/span-->
           
          </div><!--/row-->
          
        <div class="row-fluid">
            <div class="span6">
              <h2>III、眼部体征：</h2>
              <p>1、Schirmer I 试验（＋）（£5mm/5分）；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios7" id="optionsRadios1" value="1" {% if si.optionsRadios7 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios7" id="optionsRadios2" value="0" {% if si.optionsRadios7 == '0' %}checked{% endif %} />
              否
            </label>
              
               <p>2、角膜染色（＋）（³4 van Bijsterveld计分法）。</p>
                <label class="radio">
              <input type="radio" name="optionsRadios8" id="optionsRadios1" value="1" {% if si.optionsRadios8 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios8" id="optionsRadios2" value="0" {% if si.optionsRadios8 == '0' %}checked{% endif %} />
              否
            </label>
             
            </div><!--/span-->
            <div class="span6">
              <h2>IV、组织学检查：</h2>
              <p>下唇腺病理示淋巴细胞灶³1。（指4mm2组织内至少有50个淋巴细胞聚集于唇腺间质者为一灶）。</p>
              <label class="radio">
              <input type="radio" name="optionsRadios9" id="optionsRadios1" value="1" {% if si.optionsRadios9 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios9" id="optionsRadios2" value="0" {% if si.optionsRadios9 == '0' %}checked{% endif %} />
              否
            </label>
           
            </div><!--/span-->
           
          </div><!--/row-->
          
          <div class="row-fluid">
            <div class="span6">
              <h2>V、 唾液腺受损：</h2>
              <p>1、唾液流率（＋）（£1.5ml/15分）；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios10" id="optionsRadios1" value="1" {% if si.optionsRadios10 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios10" id="optionsRadios2" value="0" {% if si.optionsRadios10 == '0' %}checked{% endif %} />
              否
            </label>
              
               <p>2、腮腺造影（＋）；（腮腺造影示弥漫性涎管扩张，斑点状、空洞状或破坏性改变，同时排除大导管阻塞的可能。）</p>
                <label class="radio">
              <input type="radio" name="optionsRadios11" id="optionsRadios1" value="1" {% if si.optionsRadios11 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios11" id="optionsRadios2" value="0" {% if si.optionsRadios11 == '0' %}checked{% endif %} />
              否
            </label>
            <p>3、唾液腺同位素检查（＋）（唾液腺闪烁扫描显示延迟摄取、浓度降低和/或示踪剂的延迟分泌）</p>
                <label class="radio">
              <input type="radio" name="optionsRadios12" id="optionsRadios1" value="1" {% if si.optionsRadios12 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios12" id="optionsRadios2" value="0" {% if si.optionsRadios12 == '0' %}checked{% endif %} />
              否
            </label>
             
            </div><!--/span-->
            <div class="span6">
              <h2>VI、自身抗体：</h2>
              <p>抗SSA/Ro或抗SSB/La（＋）（双扩散法）<br />抗SSA/Ro：&nbsp;&nbsp;&nbsp;&nbsp;抗SSB/La：</p>
              
              <label class="radio">
              <input type="radio" name="optionsRadios13" id="optionsRadios1" value="1" {% if si.optionsRadios13 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios13" id="optionsRadios2" value="0" {% if si.optionsRadios13 == '0' %}checked{% endif %} />
              否
            </label>
           
            </div><!--/span-->
           
          </div><!--row-->
          
          
                    <div class="row-fluid">
            <div class="span12">
              <h3>1、原发性干燥综合征：<h4>无任何潜在疾病的情况下，有下述2条则可诊断：</h4></h3>
              <p>a.符合表1中4条或4条以上，但必须含有条目IV（组织学检查）和/或条目VI（自身抗体）；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios14" id="optionsRadios1" value="1" {% if si.optionsRadios14 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios14" id="optionsRadios2" value="0" {% if si.optionsRadios14 == '0' %}checked{% endif %} />
              否
            </label>
              
               <p>b.条目III、IV、V、VI 4条中任3条阳性。</p>
                <label class="radio">
              <input type="radio" name="optionsRadios15" id="optionsRadios1" value="1" {% if si.optionsRadios15 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios15" id="optionsRadios2" value="0" {% if si.optionsRadios15 == '0' %}checked{% endif %} />
              否
            </label>
           <h3>2、继发性干燥综合征：</h3>
              <p>患者有潜在的疾病（如任一结缔组织病），而符合表1的I和II中任1条，同时符合条目III、IV、V中任2条。</p>
              <label class="radio">
              <input type="radio" name="optionsRadios16" id="optionsRadios1" value="1" {% if si.optionsRadios16 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios16" id="optionsRadios2" value="0" {% if si.optionsRadios16 == '0' %}checked{% endif %} />
              否
            </label>
            <h3>3、必须除外：</h3>
              <p>颈头面部放疗史，丙肝病毒感染，爱滋病（AIDS），淋巴瘤，结节病，移植物抗宿主（GVH）病，抗乙酰胆碱药的应用（如阿托品、莨菪碱、溴丙胺太林、颠茄等）（距末次使用的时间间隔少于4倍药物半衰期）。</p>
              <label class="radio">
              <input type="radio" name="optionsRadios17" id="optionsRadios1" value="1" {% if si.optionsRadios17 == '1' %}checked{% endif %} />
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios17" id="optionsRadios2" value="0" {% if si.optionsRadios17 == '0' %}checked{% endif %} />
              否
            </label>
           
           
           
           
             
            </div><!--/span-->
            
           
          </div><!--row-->
          
          <br />
                           <input name="Standard_id" type="hidden" value="{{si.id}}"/>
            <button id="flbz_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
          </form>
          
{% endfor %}
{% else %}

 <form id="flbz_form" action="{% url sle.views.save_Standard %}" method="POST" class="form-inline" >{% csrf_token %}
 
<div class="row-fluid">
            <div class="span6">
              <h2>I、口腔症状：</h2>
              <p>1、每日感口干持续3个月以上；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios1" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios1" id="optionsRadios2" value="0" checked>
              否
            </label>
              
               <p>2、成年后腮腺反复或持续肿大；</p>
                <label class="radio">
              <input type="radio" name="optionsRadios2" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios2" id="optionsRadios2" value="0" checked>
              否
            </label>
              <p>3、吞咽干性食物时需用水帮助。</p>
               <label class="radio">
              <input type="radio" name="optionsRadios3" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios3" id="optionsRadios2" value="0" checked>
              否
            </label>
            </div><!--/span-->
            <div class="span6">
              <h2>II、眼部症状：</h2>
              <p>1、每日感到不能忍受的眼干持续3个月以上；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios4" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios4" id="optionsRadios2" value="0" checked>
              否
            </label>
              
               <p>2、有反复的砂子进眼或砂磨感觉；</p>
                <label class="radio">
              <input type="radio" name="optionsRadios5" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios5" id="optionsRadios2" value="0" checked>
              否
            </label>
              <p>3、每日需用人工泪液3次或3次以上。</p>
               <label class="radio">
              <input type="radio" name="optionsRadios6" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios6" id="optionsRadios2" value="0" checked>
              否
            </label>
            </div><!--/span-->
           
          </div><!--/row-->
          
        <div class="row-fluid">
            <div class="span6">
              <h2>III、眼部体征：</h2>
              <p>1、Schirmer I 试验（＋）（£5mm/5分）；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios7" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios7" id="optionsRadios2" value="0" checked>
              否
            </label>
              
               <p>2、角膜染色（＋）（³4 van Bijsterveld计分法）。</p>
                <label class="radio">
              <input type="radio" name="optionsRadios8" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios8" id="optionsRadios2" value="0" checked>
              否
            </label>
             
            </div><!--/span-->
            <div class="span6">
              <h2>IV、组织学检查：</h2>
              <p>下唇腺病理示淋巴细胞灶³1。（指4mm2组织内至少有50个淋巴细胞聚集于唇腺间质者为一灶）。</p>
              <label class="radio">
              <input type="radio" name="optionsRadios9" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios9" id="optionsRadios2" value="0" checked>
              否
            </label>
           
            </div><!--/span-->
           
          </div><!--/row-->
          
          <div class="row-fluid">
            <div class="span6">
              <h2>V、 唾液腺受损：</h2>
              <p>1、唾液流率（＋）（£1.5ml/15分）；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios10" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios10" id="optionsRadios2" value="0" checked>
              否
            </label>
              
               <p>2、腮腺造影（＋）；（腮腺造影示弥漫性涎管扩张，斑点状、空洞状或破坏性改变，同时排除大导管阻塞的可能。）</p>
                <label class="radio">
              <input type="radio" name="optionsRadios11" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios11" id="optionsRadios2" value="0" checked>
              否
            </label>
            <p>3、唾液腺同位素检查（＋）（唾液腺闪烁扫描显示延迟摄取、浓度降低和/或示踪剂的延迟分泌）</p>
                <label class="radio">
              <input type="radio" name="optionsRadios12" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios12" id="optionsRadios2" value="0" checked>
              否
            </label>
             
            </div><!--/span-->
            <div class="span6">
              <h2>VI、自身抗体：</h2>
              <p>抗SSA/Ro或抗SSB/La（＋）（双扩散法）<br />抗SSA/Ro：&nbsp;&nbsp;&nbsp;&nbsp;抗SSB/La：</p>
              
              <label class="radio">
              <input type="radio" name="optionsRadios13" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios13" id="optionsRadios2" value="0" checked>
              否
            </label>
           
            </div><!--/span-->
           
          </div><!--row-->
          
          
                    <div class="row-fluid">
            <div class="span12">
              <h3>1、原发性干燥综合征：<h4>无任何潜在疾病的情况下，有下述2条则可诊断：</h4></h3>
              <p>a.符合表1中4条或4条以上，但必须含有条目IV（组织学检查）和/或条目VI（自身抗体）；</p>
              <label class="radio">
              <input type="radio" name="optionsRadios14" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios14" id="optionsRadios2" value="0" checked>
              否
            </label>
              
               <p>b.条目III、IV、V、VI 4条中任3条阳性。</p>
                <label class="radio">
              <input type="radio" name="optionsRadios15" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios15" id="optionsRadios2" value="0" checked>
              否
            </label>
           <h3>2、继发性干燥综合征：</h3>
              <p>患者有潜在的疾病（如任一结缔组织病），而符合表1的I和II中任1条，同时符合条目III、IV、V中任2条。</p>
              <label class="radio">
              <input type="radio" name="optionsRadios16" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios16" id="optionsRadios2" value="0" checked>
              否
            </label>
            <h3>3、必须除外：</h3>
              <p>颈头面部放疗史，丙肝病毒感染，爱滋病（AIDS），淋巴瘤，结节病，移植物抗宿主（GVH）病，抗乙酰胆碱药的应用（如阿托品、莨菪碱、溴丙胺太林、颠茄等）（距末次使用的时间间隔少于4倍药物半衰期）。</p>
              <label class="radio">
              <input type="radio" name="optionsRadios17" id="optionsRadios1" value="1" >
              是
            </label>
            <label class="radio">
              <input type="radio" name="optionsRadios17" id="optionsRadios2" value="0" checked>
              否
            </label>
           
           
           
           
             
            </div><!--/span-->
            
           
          </div><!--row-->
          
          <br />
                           
            <button id="flbz_submit" type="submit" class="btn btn-info" style="float:right;">更新</button>
          </form>
{% endif %}
 
 
</div>


        
        </section>
        
        

                <section id="fhlb">

        </section>
       
       
       
       
       
</div>

</div>
</div>


{% endblock %} 

{% block some_js %}

<script type="text/javascript">

var flag = 1;
var newpn = '';
var newpn1 = '';

$("#add_PatientNo").click(function(){
  
    
    flag++;
	var $label = $("<div id='remove_pn"+flag+"'><label class='control-label' for='PatientNo'>门诊号码 </label><input type='text' class='input-small' id='PatientNo"+flag+"' placeholder='门诊号' >  <button class='btn btn-mini btn-primary' onclick='deltr("+flag+")' type='button'>删除门诊号</button><br/></div>");	
  
  $("#add_PatientNo").after($label);
  

  });
 
 
 $("#add_hospitNo").click(function(){
  
    
    flag++;
	var $label = $("<div id='remove_ph"+flag+"'><label class='control-label' for='hospitalized'>住院号码 </label><input type='text' class='input-small' id='hospitalized"+flag+"' placeholder='住院号' >  <button class='btn btn-mini btn-primary' onclick='deltr2("+flag+")' type='button'>删除住院号</button><br/></div>");	
  
  $("#add_hospitNo").after($label);
  

  });



  
 
 $(document).ready(function() {
 
 
 $('#hzzl_form').validate({
 rules: {
			patient_name: "required",
			patient_age: {    
       						digits: true,
    						required: true
							},
			patient_birthdate:"dateISO",
//			patient_company:"required",
//			patient_home:"required",
			patient_tel: {    
       						digits: true,
//							required: true
							},
			patient_card: {    
       						digits: true,
//							required: true
							},
//			patient_native:"required",
			patient_inputdate:"dateISO",
			patient_number: {    
       						digits: true,
							required: true
							},
//			patient_gender:"required",	
			Patient_no: {    
       						digits: true,
							required: true
							},
			hospitalized_no: {    
       						digits: true,
							required: true
							},
			
		},
		messages: {
			patient_name: "必填",
			patient_age: "数字",
			patient_birthdate: "请输入正确的日期",
						patient_company:"必填",
			patient_home:"必填",
			patient_tel: "格式",
			patient_native: "必填",
			patient_inputdate: "请输入正确的日期",
			patient_number: "必填",
			patient_gender: "必填",	
			Patient_no: "数字",
			hospitalized_no: "数字",
			patient_card:"数字"

		
		},
		errorElement: "em",				//用来创建错误提示信息标签
		/*success: function(label) {			//验证成功后的执行的回调函数
			//label指向上面那个错误提示信息标签em
			label.text(" ")				//清空错误提示消息
				.addClass("success");	//加上自定义的success类
		}*/
		
 
 });
 
 
  //提交开始
 $('#flbz_form').submit(function() {
		$('#showmessage').css("display","block");
		$.ajax({ // create an AJAX call...
                data: $(this).serialize(), // get the form data
                type: $(this).attr('method'), // GET or POST
                url: $(this).attr('action'), // the file to call
                success: function(response,textStatus) { // on success..
				$('#showmessage').text('信息已经更新!');
                  
				  setTimeout(function() {
				  $('#showmessage').css("display","none");
				  }, 1500);
               window.location.href="{% url sle.views.list_patient %}";
                }
            });
            return false;

		});//提交结束 
 
 
 
 //提交开始
 $('#tjbg_form').submit(function() {
		$('#showmessage').css("display","block");
		$.ajax({ // create an AJAX call...
                data: $(this).serialize(), // get the form data
                type: $(this).attr('method'), // GET or POST
                url: $(this).attr('action'), // the file to call
                success: function(response,textStatus) { // on success..
				$('#showmessage').text('信息已经更新!');
                 
				  setTimeout(function() {
				  $('#showmessage').css("display","none");
				  }, 1500);
               
                }
            });
            return false;

		});//提交结束 
 
 //提交开始
 $('#hzls_form').submit(function() {
		$('#showmessage').css("display","block");
		$.ajax({ // create an AJAX call...
                data: $(this).serialize(), // get the form data
                type: $(this).attr('method'), // GET or POST
                url: $(this).attr('action'), // the file to call
                success: function(response,textStatus) { // on success..
				$('#showmessage').text('信息已经更新!');
                  
				  setTimeout(function() {
				  $('#showmessage').css("display","none");
				  }, 1500);
               
                }
            });
            return false;

		});//提交结束 
 
 

 //提交开始
 $('#bqyb_form').submit(function() {
		$('#showmessage').css("display","block");
		$.ajax({ // create an AJAX call...
                data: $(this).serialize(), // get the form data
                type: $(this).attr('method'), // GET or POST
                url: $(this).attr('action'), // the file to call
                success: function(response,textStatus) { // on success..
				$('#showmessage').text('信息已经更新!');
                  
				  setTimeout(function() {
				  $('#showmessage').css("display","none");
				  }, 1500);
               
                }
            });
            return false;

		});//提交结束 

 
 //提交开始
 $('#hzbz_form').submit(function() {
		$('#showmessage').css("display","block");
		$.ajax({ // create an AJAX call...
                data: $(this).serialize(), // get the form data
                type: $(this).attr('method'), // GET or POST
                url: $(this).attr('action'), // the file to call
                success: function(response,textStatus) { // on success..
				$('#showmessage').text('信息已经更新!');
                  
				  setTimeout(function() {
				  $('#showmessage').css("display","none");
				  }, 1500);
               
                }
            });
            return false;
        
		
		
		});//提交结束  
 
        $('#hzyy_form').submit(function() {
		$('#showmessage').css("display","block");
		$.ajax({ // create an AJAX call...
                data: $(this).serialize(), // get the form data
                type: $(this).attr('method'), // GET or POST
                url: $(this).attr('action'), // the file to call
                success: function(response,textStatus) { // on success..
				$('#showmessage').text('信息已经更新!');
                  
				  setTimeout(function() {
				  $('#showmessage').css("display","none");
				  }, 1500);
               
                }
            });
            return false;
        
		
		
		});//提交结束
          
 
 
 
        $('#hzzl_form').submit(function() { // catch the form's submit event
		
		if($('#inputName').val()==''||$('#inputName').val()==null){
		alert('患者名称不可以为空！');
		 return false;
		}
		if($('#inputAge').val()==''||$('#inputAge').val()==null){
		alert('患者年龄不可以为空！');
		return false;
		}
		if($('#birthdate').val()==''||$('#birthdate').val()==null){
		alert('患者出生日期不可以为空！');
		return false;
		}
		if($('#patient_inputdate').val()==''||$('#patient_inputdate').val()==null){
		alert('填表日期不可以为空！');
		return false;
		}
		if($('#recordNo').val()==''||$('#recordNo').val()==null){
		alert('登记号不可以为空！');
		return false;
		}
                
        
		var new_patientno = $('input[id^=PatientNo]');
		var new_hospno = $('input[id^=hospitalized]');
		
		$.each(new_hospno,function(i){
  
  		if(i>0){
  		newpn1+='-'+this.value;
  		}else{
  		newpn1+=this.value;
  		}
  
  		});
		
		
        $.each(new_patientno,function(i){
  
  		if(i>0){
  		newpn+='-'+this.value;
  		}else{
  		newpn+=this.value;
  		}
  
  		});
		
		
        $('input[id=new_patno]').val(newpn);
		$('input[id=new_hosno]').val(newpn1);
//		$('input[id=recordNo]').val('{{patient_instance.patient_number}}');
        $('#showmessage').css("display","block");
		
        
            $.ajax({ // create an AJAX call...
                data: $(this).serialize(), // get the form data
                type: $(this).attr('method'), // GET or POST
                url: $(this).attr('action'), // the file to call
                success: function(response,textStatus) { // on success..

				if(response==1){
				
				$('#showmessage').text('信息已经更新!');
				
                 
				  
				  setTimeout(function() {
				  $('#showmessage').css("display","none");
				  }, 1500);
				  
				  
                   }//if end
                }
            });
            return false;
        });//提交结束
        
        
   
    }); //onready end 
    
    
 
 
   var deltr =function(index)
    {

    $("#remove_pn"+index).remove();
    
  }
  
  var deltr2 =function(index)
    {

    $("#remove_ph"+index).remove();
    
  }
 
 /* 
$('#recordNo').blur(function(){

$.ajax({ // create an AJAX call...
                data: {patient_number:$('#recordNo').val()}, // get the form data
                type: "GET", // GET or POST
                url: "{% url sle.views.check_record %}", // the file to call
                success: function(response,textStatus) { // on success..
                  if (response==1){
				  alert("此登记号已经使用过,请换号!");
				  $('#recordNo').focus();
				  }
                
                }
            });
            return false;
        });
		*/
  
  
  
 
  </script>

{% endblock %}